import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
//import LCZYView from '../views/LCZYView.vue'

Vue.use(VueRouter)
//配置路由
const routes = [
	
  {
    path: '/',
    name: 'home',
    component: HomeView,
	redirect: '/index', //重定向
	children:[
		{
			path: '/index',
			name:'index',
			component: ()=>import('../views/home/IndexView.vue')
		},
		{
			  path: '/reg',
			  name:'reg',
			  component: ()=>import('../views/home/RegView.vue')
		},
		{
			  path: '/login',
			  name:'login',
			  component: ()=>import('../views/home/LoginView.vue')
		},
		{
			  path: '/personal',
			  name:'personal',
			  component: ()=>import('../views/home/PersonalView.vue'),
			  children:[
				  {
					path: 'index',
				    name:  'index',
				   component: ()=>import('../views/personal/PersonalIndexView.vue')
				  },
				  {
				  	path: 'management',
				    name:  'management',
				   component: ()=>import('../views/personal/PersonalManagementView.vue')
				  },
				  {
				  	path: 'post',
				    name:  'post',
				   component: ()=>import('../views/personal/PersonalPostView.vue')
				  },
				  
				  
				  
				  
			  ]
		}
		]
  },
  
 
  // {
  //   path: '/lczy',
  //   name: 'lczy',
  //   component: LCZYView
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // },
  // {
  // 		  path:'/reg',
  // 		  name: 'reg',
  // 		  component: () => import('../views/RegView.vue')
  // 	},
  // 	{
  // 		  path:'/student',
  // 		  name: 'student',
  // 		  component: () => import('../views/StudentView.vue')
  // 	},
  // 	{
  // 		  path:'/carousel',
  // 		  name: 'carousel',
  // 		  component: () => import('../views/CarouselView.vue')
  // 	},
  // 	{
  // 		  path:'/student1',
  // 		  name: 'student1',
  // 		  component: () => import('../views/StudentView1.vue')
  // 	},
  // {
  // 	  path:'/a',
  // 	  name: 'a',
  // 	  component: () => import('../views/AView.vue')
  // },
  // {
  // 	  path:'/b',
  // 	  name: 'b',
  // 	  component: () => import('../views/BView.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
